package com.gxa.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @author bq
 * Date: 2020/10/20 19:54
 * Description:
 * Version: V1.0
 */
@Component
@ApiModel(value = "返回对象实体")
public class ResponseData<T> {
    @ApiModelProperty(name = "code",notes = "状态码",value = "状态码")
    private int code;
    @ApiModelProperty(name = "msg",notes = "返回信息",value = "返回信息")
    private String msg;
    @ApiModelProperty(name = "data",notes = "返回对象",value = "返回对象")
    private T data;
    @ApiModelProperty(name = "token")
    private String token;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return "ResponseData{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                ", token='" + token + '\'' +
                '}';
    }
}
